'''
演示如何操作Excel文件

workbook 工作簿
worksheet 工作表
cell 单元格 A1
'''

import openpyxl

# 打开工作簿
workbook = openpyxl.load_workbook(r'selenium\ranzhi\data.xlsx')
# 打开工作表
worksheet = workbook['success']
[('admin','123456'),('user0','123456'),('user1','123456')]
# 获取取单元格
r = []
for row in worksheet:
    t = []
    for cell in row:
        t.append(cell.value)
    t = tuple(t)
    r.append(t)
print(r)

a=[]
for i in worksheet.values:
    # print(i)
    a.append(i)
a.pop(0)
print(a)
print(worksheet.values)